package com.zk.shop.service.impl;

import com.zk.shop.mapper.RoleMapper;
import com.zk.shop.pojo.Role;
import com.zk.shop.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleMapper roleMapper;
    @Override
    public List<Role> roleList(Integer id) {
        return roleMapper.roleList(id);
    }

    @Override
    public Integer saveRole(String rolename, Integer id) {
        return roleMapper.saveRole(rolename, id);
    }

    @Override
    public Integer removeRole(Integer id) {
        return roleMapper.removeRole(id);
    }

    @Override
    public Integer pushRole(String rolename) {
        return roleMapper.pushRole(rolename);
    }
}
